<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    function Parent(m){
        this.message = m;
        this.show = function(){
            console.log(this.message);
        }
    }
    Parent.prototype.init = function(){
        console.log("12312312")
    }

    function Child(m){
        Parent.call(this, m);
    }
    Child.prototype = {
        constructor:Child,
        ...Parent.prototype,
        init:function(){
            console.log(0)
        }
    }



    const p = new Parent("hello world");
    console.log(p);
    p.show();
    p.init();

    const c = new Child("hello 世界");
    console.log(c);
    c.show();
    c.init();


</script>
</html>